import hx.layout.FlowLayout;
import hx.display.Image;
import hx.assets.Assets;
import hx.display.Stage;

class GameStage extends Stage {
	override function onStageInit() {
		super.onStageInit();
		// 代码开始的地方...
		var assets = new Assets();
		assets.loadAtlas("assets/EmojAtlas.png", "assets/EmojAtlas.xml");
		assets.onComplete((a) -> {
			// 加载完成，读取图片
			this.layout = new FlowLayout();
			for (data in assets.atlases.get("EmojAtlas").bitmapDatas) {
				var img = new Image(data);
				this.addChild(img);
			}
		});
		assets.start();
	}
}
